-- GENERATED SPELL FOR [Jademir Oracle] --


function spell0_5317(pUnit, Event) --@Regrowth,n/a--
pUnit:FullCastSpellOnTarget(20665,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5317', 23000, 1)
end

function spell1_5317(pUnit, Event) --@Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(20664,pUnit)
pUnit:RegisterEvent('Sorts_5317', 12000, 1)
end

function Sorts_5317(pUnit, Event)
local choix_sorts_5317 = math.random(0, 1)
if choix_sorts_5317 == 0 then
pUnit:RegisterEvent('spell0_5317', 1, 1)
end
if choix_sorts_5317 == 1 then
pUnit:RegisterEvent('spell1_5317', 1, 1)
end
end

function mob5317_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5317', math.random(1500, 3000), 1)
end

function mob5317_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5317_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5317_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5317, 1, 'mob5317_Action')
RegisterUnitEvent(5317, 2, 'mob5317_Leave')
RegisterUnitEvent(5317, 3, 'mob5317_Kill')
RegisterUnitEvent(5317, 4, 'mob5317_Die')
